package com.hdax.dm.dto.item;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * 商品列表返回商品信息
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(indexName = "dm_item")
public class ItemListDto {

    private Long id;
    @Field(value = "imgurl")
    private String imgUrl;
    @Field(value = "areaid")
    private String areaId;
    @Field(value = "areaname")
    private String areidaName;
    @Field(value = "itemname")
    private String itemName;
    @Field(value = "abstractmessage")
    private String abstractMessage;
    @Field(value = "starttime",type = FieldType.Date,format = DateFormat.date_optional_time)
    private String startTime;
    @Field(value = "endtime",type = FieldType.Date,format = DateFormat.date_optional_time)
    private String endTime;
    @Field(value = "minprice")
    private Double minPrice;
    @Field(value = "maxprice")
    private Double maxPrice;
    @Field(value = "address")
    private String address;
    @Field(value = "latitude")
    private String latitude;
    @Field(value = "longitude")
    private String longitude;

}
